Method for dividing a coordinate system into a plurality of intervals based on the distribution of objects represented within the coordinate system

ABSTRACT

A method for handling a database containing objects extending into a coordinate system, representing a multidimensional reality. The coordinate system is divisible into a plurality of defined, multidimensional intervals. Each time an object is entered into the database, the method determines the multidimensional intervals into which the object extends. For each of these intervals, the method determines the number of objects extending into the interval and compares the number of objects with a predetermined threshold value. If the threshold value is exceeded, the interval is divided into at least two smaller intervals, in order to limit the number of objects within any interval. Each interval is linked to a set of objects extending into that interval, and each object is linked to a set of intervals into which the object at least partly extends.

This application is the National Phase under 35 USC §371 of PCTInternational Application No. PCT/SE00/01440 which has an Internationalfiling date of Jul. 6, 2000, which designated the United States ofAmerica, the entire contents of which are hereby incorporated byreference.

TECHNICAL FIELD

The present invention relates to a method for handling a databasecontaining objects that have an extension in a coordinate systemrepresenting a multidimensional reality, which coordinate system isdivisible into a plurality of defined, multidimensional intervals.

BACKGROUND ART

Various forms of databases for storing information exist very often inour increasingly computerised world. Information is usually structuredin the database in the form of objects which, for instance, mayrepresent a physical article whose properties are stored in thedatabase.

When transferring the physical reality to a database, softwarecomprising a graphical interface is often used, models being drawn intoa coordinate system and stored in the database by the software. This iscalled “writing” or “entering” the model into the database. One or moremodels are linked to an object, which may also be linked to informationabout the properties, choice of material, etc. of the object. Thegeometric models and other properties are stored in documents that arelinked to an object by means of references to an object ID. This type ofsystem is well known in CAD (Computer Aided Design), for instance.

The information in the database is used in calculations performed by thedesigner, such as strength calculations, optimisation calculations,collision analyses, etc. When the space is large in relation to theobject, the number of objects may be extremely large. One problemarising out of this is that, before each calculation, the system takesall the objects in the space into consideration. This is oftencompletely wasted effort since normally only a few neighbouring objectsaffect a calculation that is being performed.

Considerable differences may also exist between the degree of detail fordifferent objects. A flat wall may perhaps be modelled sufficiently wellby a single object, say a rectangular parallelepiped. A clock hanging onthe wall, on the other hand, may be accurately modelled and thereforecontain a large number of small components.

A traditional solution to this problem is for the system to divide theobjects into hierarchical levels or scales. Small parts are grouped in acombined object that can be represented with less information. The clockmay contain a number of objects on a smaller scale, for instance, all ofwhich represent a particular component in the clock. On a larger scalethe whole clock is represented by a single object corresponding only toits outer geometry, for instance. The smaller scale is “hidden” from adesigner working on the larger scale since he/she only needs to make useof relations between objects on the larger scale. Similarly, therelations on the larger scale are deactivated when work is beingperformed on the smaller scale.

This manner of handling the problem is unsatisfactory for severalreasons. In the first place, the user can only work in one scale at atime, which entails problems when properties of an object influenceobjects on a smaller or larger scale. For example: if the clockmentioned above has a suspension hook in the smaller scale, this mayaffect the force that in the larger scale holds the clock on the wall. Achange in the hook thus affects a relation higher up in the hierarchy.This relationship is not apparent if the work is limited to one scale ata time.

In the second place, it is difficult to draw limits as to which objectsmay be permitted on a particular scale. Different applications may havedifferent suitable divisions, resulting in deficient or non-existentcompatibility.

According to known technology the space is divided into a large numberof part-volumes which are stored in the database. Each object may extendinto several part-volumes and, for each part-volume, the database storeswhich objects are at least partially in this part-volume. In this case acalculation performed for one point in the space need only be affectedby information relating to objects in the small part-volume thatincludes the relevant point. Naturally, if the calculation relates to anobject extending over several part-volumes, information from the objectsin all these part-volumes is involved. On the other hand, informationrelating to objects located in part-volumes entirely separate from therelevant part-volume need not be included in the calculation, and thesystem therefore avoids numerous unnecessary operations.

The drawback with this system is that it is completely static. In avolume with a few large objects, such as a wall, a large number ofpart-volumes will only contain reference to a single object. However, inthe case of an object with many small parts, such as a clock, apart-volume may contain a very large number of references. Consequently,a calculation such as a collision calculation, performed somewhere onthe wall, will comprise considerably more calculation phases if it isperformed for any of the part-volumes near the clock than if it isperformed for an empty wall surface, although the calculation is notnecessarily affected by the clock.

It could be said that the system solves the problem of differenthierarchical levels by locking the entire coordinate system to aspecific level that is assumed to be sufficiently small. Unfortunately,problems arise with part-volumes containing information of verydifferent type—quite simply an unbalance in the mathematics defining thecoordinate system and the objects placed in it. This results inextremely demanding calculations for collision or optimisation analysis,for instance.

OBJECT OF THE INVENTION

One object of the present invention is to provide a dynamic,automatically optimising division of a space map, i.e. amultidimensional “room” represented by a coordinate system.

A second object of the invention is to provide a dynamic database.

A third object of the invention is to provide a database allowing anyoneeasily to obtain information as to which objects are located in theproximity of an object.

SUMMARY OF THE INVENTION

The present invention relates to a method of the type described by wayof introduction further characterised by, every time an object isentered into the database, determining which multidimensional intervalsthe object has an extension in, for each of these intervals determiningthe number of objects having an extension therein, comparing said numberof objects with a predetermined threshold value and, if the thresholdvalue is exceeded, dividing the interval into at least two smallerintervals, in order to limit the number of objects related to anextension in an optional defined interval.

It is thus ensured that only as many objects as indicated by thethreshold value exist in each interval. In parts of the interval wheremany small objects are situated, the interval is divided into a largenumber of small sub-intervals. In parts of the interval where only a fewobjects are situated, however, the interval is divided into largersub-intervals.

In accordance with a preferred embodiment, the method also includes thestep of associating each interval with a set of objects that are relatedto an extension in the interval.

The method of dynamically dividing an interval into several smallerintervals in accordance with the invention is used to obtain a dynamicspace map in which each object is associated with at least one interval,and in which several intervals are associated with at least one object.Information as to how interval and object are related to each other canbe used to obtain important information as to the relation between theobjects. The size of an interval, for instance, indicates how close itsobjects are in relation to other, adjacent intervals.

An immediate advantage of this type of database is that various areas ofthe multidimensional space map are divided into different numbers ofintervals, depending on how many and how small the objects are that arerelated to each area.

The coordinate system may comprise at least one time dimension and oneor more, preferably three, spatial dimensions. This is advisable inorder to satisfactorily reproduce the reality represented by thecoordinate system.

Each division of an interval is preferably only effected in onedimension. Better control is obtained over the new intervals created byonly dividing in one dimension at a time.

When the threshold value is exceeded the interval is preferably dividedinto two smaller intervals, suitably into two intervals of equal size.This way of repeatedly halving intervals is extremely suitable forimplementation in a computer, using binary arithmetic.

BRIEF DESCRIPTION OF THE DRAWINGS

The present invention will be described in more detail in the followingwith reference to the accompanying drawings illustrating preferredembodiments of the invention by way of example.

FIG. 1 illustrates schematically an environment in which the method inaccordance with the invention is used.

FIG. 2 shows an object entered in a coordinate system that is dividedinto four intervals.

FIG. 3 shows schematically how an object is linked to several intervalobjects, and how each interval ID is linked to an object ID.

FIG. 4 shows a flow chart illustrating one embodiment of the invention.

FIG. 5 shows a flow chart of the step of dividing an interval as shownin FIG. 4.

FIG. 6 shows a division of an interval into a two-dimensional coordinatesystem in accordance with the invention.

FIGS. 7 a–7 b show a binary notation of a dimension of an interval inaccordance with one embodiment of the invention.

DESCRIPTION OF A PREFERRED EMBODIMENT

The method in accordance with the invention is applied in a computerenvironment comprising a database 1 with a plurality of objects 2. Eachobject is linked (e.g. by pointers) to one or more documents 3describing the object. First software 4 to handle the objects in thedatabase and second software 5 comprising a user interface are alsoshown. Said first and second software units may naturally be integratedin a software unit 6 and will be referred to generally in the followingas the “software” 6.

The software 6 permits a user to create, edit and remove objects 2, andcontinuously handles the database in accordance with the changes and inaccordance with a specific structure. The software 6 is also arranged,for instance, to be able to perform searches in the database and handlerelations between objects. An environment of this type occurs in amultitude of applications, such as CAD or the global database calledWWW.

The method in accordance with the invention is intended to beimplemented in the software 6 or in separate software cooperating withone or more databases.

When an object is entered into the database it is linked to a modelcreated previously, possibly via a transformation matrix defining howthe object is oriented in relation to the model. The object thencomprises the existence of a model in a coordinate system and it can besaid that the object has an extension in the coordinate system.

In a simple case the coordinate system, representing a multidimensionalreality, comprises the three spatial dimensions, but in accordance witha preferred embodiment it also includes time and one or more abstractdimensions which may represent alternative embodiments of a component ora process, for instance.

In accordance with one embodiment of the invention, every object islinked to one or more intervals of the coordinate system, with the samenumber of dimensions as the coordinate system. At the same time, thedatabase includes a plurality of interval-objects, each of which islinked to one or more objects.

FIG. 2 shows how a model 10 is entered into a coordinate system that isdivided into four intervals 11–14, equal in size, and FIG. 3 illustrateshow the model and the interval are represented in the database 1. Themodel 10 is represented in the database 1 by an object 20 with an objectID 21. Each interval 11–14 is represented in the database by aninterval-object 22–25, assigned interval ID 26–29. The object 20 islinked to the four interval-objects 22–25, preferably by pointers 30 tothe interval-objects ID 26–29. Similarly, each interval-object 22–25 islinked to the object 20, preferably by means of pointers 31 to theobject ID 21.

Thus, every time an object is entered into the database, it is assigneda reference (pointer) to one or more interval-objects. Each of theseinterval-objects is then assigned a reference to the relevant object.The intervals are determined so that they fully encompasse the extensionin the coordinate system to which the object is related, and at the sametime the number of objects that each interval is associated with islimited to a specific threshold value.

The method of dividing the intervals is described in the following withreference to FIGS. 4–5.

In step 41 an object 20 is entered into the database. A comparison ofthe extension of the object 20 with the interval-object 22–25 of thedatabase determines the intervals within which the object 20 has anextension (step 42), and steps 43–44 are performed for all theseintervals.

The number of objects occurring in the relevant interval is determinedin step 43. In the preferred embodiment of the invention described here,this can be read from the database, since each interval-object is linkedto a set of objects. If the database lacks this structural construction,for all objects in the database the software 6 can check whether theyhave an extension in the relevant interval.

In step 44 this number is compared with the threshold value. If thethreshold value is not exceeded the program control will continue tostep 45 which sees to it that steps 43–44 are repeated for all intervalsidentified in step 42. If, on the other hand, the threshold is exceededthe program control will be moved to step 46 where the interval isdivided into two intervals. The program control then returns to step 42to decide if the object has an extension in both these intervals or onlyone of them. Steps 43 and 44 are then repeated in one or both theintervals.

When the program control reaches the end, each interval has only as manyobject references (i.e. occurrences of an object) as stated by thethreshold value. In a preferred embodiment a minimum interval size isdefined in order to limit the division routine. More objects may thenadmittedly occur in an interval than is stated by the threshold value,but this limitation greatly facilitates handling of the database since asmallest constituent is well defined.

The flow chart in FIG. 4 consists of two loops (steps 43–45 and steps42–44) which can be woven into one another in a complicated mannerdepending on how the interval is divided. However, this can be solved bysimple programming and is not described in more detail here.

Division of the interval 31 in step 46 may take place as shown in theflow chart in FIG. 5.

The interval under consideration is first divided in one dimension (step51) by the software, so that two new sub-intervals are formed. For eachinterval, therefore the number of objects occurring in each interval isdetermined (step 52), and the number of object references that occur(step 53), i.e. the number of pointers from one of the intervals to anobject. This is repeated for each dimension in the coordinate system(step 54).

Step 55 then determines which division will give the best result, i.e.in which dimension the division shall be performed. The definition of“best” division may be formulated, for instance, so that the number ofnew object references is minimised while, at the same time, thedistribution of objects between the sub-intervals is as even aspossible. Other formulations are feasible, depending on the structurestriven for in the database.

When the software has determined which division is best, these twosub-intervals are entered into the database in the form ofinterval-object (step 56), whereupon the program control returns to step42 (FIG. 4).

The following is a description, referring to FIG. 6, of an example ofthe division of a two-dimensional coordinate system, with a thresholdvalue equal to one. The procedure is exactly analogous in the case ofseveral dimensions or with a higher threshold value.

An object A is created in the database and assigned an object ID. Sincethe object is alone in the interval 61 it is linked to this interval 61by a pointer. The interval 61 is linked to the ID of the object A insimilar manner.

A second object is then entered into the coordinate system, therebycreating another object, B, which is assigned an object ID (step 41).Upon comparison of the extension of the object B with theinterval-object of the database it is determined in which intervals theobject B has an extension (step 42) and only the interval 61 isencountered in the example.

Since, in the example, the object B also occurs in interval 61, it isestablished in step 44 that the threshold value, set to one, has beenexceeded. The interval 61 is therefore divided in one dimension (step46) into two sub-intervals 62, 63 (two rectangles), which are enteredinto the database as two new interval-objects. A new analysis of theextension of the object B in both intervals (step 42) reveals that theobject only occurs in the left interval 62. However, object A alsooccurs there and a new division (step 46) is therefore commenced. Twomore interval-objects are therefore entered into the database, whichintervals are formed by dividing the left interval in y-direction intotwo sub-intervals 64, 65, which gives a similar result. The nextdivision then occurs in x-direction, forming intervals 66 and 67, theobject A including coordinate points in both intervals 66 and 67. Theanalysis now reveals that the object B only occurs in interval 67 andthat this interval also includes an extension of object A and musttherefore be divided further. The interval 67 is divided in y-directioninto sub-intervals 68 and 69, so that only one object occurs in eachsub-interval.

In the above example a choice was made several times concerning thedimension (x or y) in which an interval should be divided. This choiceis effected in accordance with the method described above with referenceto FIG. 4. In the example, the above definition of “best” means that ifpossible an object occurs in each interval and that otherwise as few newobject references as possible are created. (Since new object referencesin accordance with the above are created every time a new sub-intervalis formed where an object occurs, more new object references are createdwhen a division occurs through an object.)

The original coordinate system has thus been divided into a plurality ofintervals 61–69, all of which are represented by interval-objects in thedatabase. Each object A, B is also linked to a set of intervals. The setfor the object A comprises intervals 61, 65 which constitute thequadratic intervals encompassing the whole object, and also intervals 66and 69, since these are the two final sub-intervals in which the objectoccurs. The set for the object B also comprises intervals 61 and 65, forthe same reasons as above, and also the interval 8 which encompasses thewhole object and is not further divided. Similarly several intervals65–69, that include a part of the objects A, B, are linked to respectiveobjects by a pointer. Intervals 61 and 65 are linked to both objects A,B, intervals 66 and 69 to object A and, finally, interval 68 to objectB.

Each interval-object suitably has an ID containing information as towhere the interval is located in the coordinate system, and alsoconcerning its extension in each dimension. The interval-object may, forexample, have an ID such as k₁, k₂, . . . , k_(N), Δ₁, Δ₂, . . . Δ_(N),where ki denotes a coordinate value in dimension i, and Δi denotes thesize of the interval in dimension i.

In the binary number system a pair consisting of coordinate value andextension in one dimension can be depicted by using one number for thecoordinate value and one for the extension. This is illustrated in FIGS.7 a and 7 b.

The interval 71 is divided into a plurality of sub-intervals 72–73 ofdifferent sizes. The smallest interval has a length one, and isequivalent to the abovementioned smallest defined interval size. Sincethe smallest interval size is known, every possible interval startingpoint can be given a coordinate, between 0 and 1111 (=15 in the decimalsystem) in the example. Note that the furthermost point (10000 binary,16 decimal) of the interval 71 cannot constitute the starting point fora sub-interval of the interval 71. The length of each sub-interval isdepicted as a multiple of the smallest interval length.

Three intervals 72–74 are marked in FIG. 7 a:

-   -   Interval 72 starts at point 10 (2 in decimal system), and is 1        long.    -   Interval 73 starts at point 100 (4), and is 100 (4) long.    -   Interval 74 starts at point 1110 (14), and is 10 (2) long.

In FIG. 7 b the interval 73 has been divided into two intervals 75, 76.Their respective designations are obtained from the designation ofinterval 73 by dividing the length in half (striking one zero in thebinary notation, 100→10), so that two starting points are formed, onebeing identical to the starting point (100) of the interval 73, and theother equal to the starting point of the interval 73 plus the newinterval length (100+10=110).

The structure of interval-objects in the database can be utilised toobtain information as to how close other objects are to an object, orthe likeliest location of its nearest neighbouring object. Since theobject is linked to interval IDs for the interval-objects in which itextends, it is sufficient to observe these interval IDs to obtaininformation concerning their extension. A part of the object lying in aninterval with slight extension must be relatively close to anotherobject, which has caused this sub-division of the interval.

By having one of the dimensions represent time, and having each objectlinked to a time extension, i.e. a time interval when they exist in aspecific place, the database in accordance with the invention can beused to divide a dynamic process in time. Movement of an object takes upa corridor in the time space, known as an envelope. According to theinvention, when two envelopes collide, these can be divided with respectto time to determine whether a collision really does occur between thetwo objects. One condition is that the object is linked to a pluralityof IDs, each of which is connected to a time interval and a position.

One of the dimensions of the coordinate system may be an abstractdimension representing alternative embodiments of an object or process.Two objects may then be in the same place at the same time but asdifferent, mutually exclusive alternatives.

The structure can also be used to distribute the contents in a databaseover several units, e.g. files or storage units. This division may thenbe based on areas of the coordinate system, so that one unit containsall the interval-objects relating to intervals forming a part of thisarea, the largest interval-object referring to the whole area.

It is also preferred for all objects in the database to have an objectID that includes the coordinates for one of the coordinate points of theobject. All objects are then suitably stored in the unit where theinterval-object containing the ID coordinate of the object is stored.

When the space map is divided in accordance with the present invention,the database units can also be correspondingly altered. A secondthreshold value, for instance, may define how many objects may be storedsimultaneously in one unit. This threshold value is determined by theproperties of each database. When this threshold value is exceeded, halfthe area connected to this unit is moved to another unit, such asanother file, another disk or a completely different physical unit.

A database is thus created in which each unit is logically connected toa specific area of the coordinate system representing the realitydepicted in the database. This is advantageous in many applications,such as design work, mining, World Wide Web, stock databases, etc.

The close connection of the database structure to the time-spatialextension of the object makes it particularly suitable in applicationswhen time and space play a decisive role. An example is booking systemsfor travel. By stating time, starting place and destination, aninterface can easily pick out suitable trips. In agriculture, many smallareas of arable land can be managed using a database in accordance withthe invention.

1. A method for handling a computer database system containing objectsthat extend into a coordinate system representing a multidimensionalreality, the coordinate system being divisible into a plurality ofdefined, multidimensional intervals, the method comprising: determining,each time an object is entered into the database, multidimensionalintervals into which the object at least partly extends; determining,for each of the intervals, the number of objects at least partlyextending into the interval; comparing the determined number of objectswith a predetermined threshold value; and dividing, if the thresholdvalue is exceeded, the interval into at least two smaller intervals ofequal dimensions, in order to limit the number of objects at leastpartly extending into any interval.
 2. A method as claimed in claim 1,further comprising the step of linking each interval to a set of objectsat least partly extending into the interval.
 3. A method as claimed inclaim 1, further comprising the step of linking each object to a set ofintervals into which the object at least partly extends.
 4. A method asclaimed in claim 1, wherein the coordinate system comprises at least onetime dimension.
 5. A method as claimed in claim 1, wherein thecoordinate system comprises at least spatial dimension.
 6. A method asclaimed in claim 1, further comprising the step of adjusting thedivision of intervals when an object is removed from the coordinatesystem.
 7. A method as claimed in claim 2, further comprising the stepof linking each object to a set of intervals into which the object atleast partly extends.
 8. A method as claimed in claim 2, wherein thecoordinate system comprises at least one time dimension.
 9. A method asclaimed in claim 3, wherein the coordinate system comprises at least onetime dimension.
 10. A method as claimed in claim 7, wherein thecoordinate system comprises at least one time dimension.
 11. A method asclaimed in claim 2, wherein the coordinate system comprises at leastspatial dimension.
 12. A method as claimed in claim 3, wherein thecoordinate system comprises at least spatial dimension.
 13. A method asclaimed in claim 7, wherein the coordinate system comprises at leastspatial dimension.
 14. A method as claimed in claim 5, wherein thecoordinate system comprises three spatial dimensions.
 15. A method asclaimed in claim 2, further comprising the step of adjusting thedivision of intervals when an object is removed from the coordinatesystem.
 16. A method as claimed in claim 3, further comprising the stepof adjusting the division of intervals when an object is removed fromthe coordinate system.
 17. A method as claimed in claim 7, furthercomprising the step of adjusting the division of intervals when anobject is removed from the coordinate system.
 18. A method for handlinga computer database system containing objects that extend into acoordinate system representing a multidimensional reality, thecoordinate system being divisible into a plurality of defined,multidimensional intervals, the method comprising: determining, eachtime an object is entered into the database, multidimensional intervalsinto which the object at least partly extends; determining, for each ofthe intervals, the number of extending into the interval; comparing thedetermined number of objects with a predetermined threshold value ineach interval in which the object has an extension; and dividing eachinterval for which the threshold value is exceeded into at least twosmaller intervals, in order to limit the number of objects at leastpartly extending into any interval.
 19. The method of claim 18, wherein,when the threshold value is exceeded the interval is divided into atleast two intervals of equal dimensions.
 20. A computer database systemincluding a memory containing objects that extend into a coordinatesystem representing a multidimensional reality, the coordinate systembeing divisible into a plurality of defined, multidimensional intervals,said database system comprising: means for determining, each time anobject is entered into the database, multidimensional intervals intowhich the object at least partly extends; means for determining, foreach of these intervals, the number of objects extending into theinterval; means for comparing said number of objects with apredetermined threshold value in each interval in which the object hasan extension; and means for dividing each interval for which thethreshold value is exceeded into at least two smaller intervals, inorder to limit the number of objects at least partly extending into anyinterval.
 21. The computer database system of claim 20, wherein, whenthe threshold value is exceeded the interval is divided into at leasttwo intervals of equal dimensions.